-- GENERATED SPELL FOR [Bloodwarder Squire] --


function spell0_20036(pUnit, Event) --@Cleanse,n/a--
pUnit:FullCastSpellOnTarget(39078,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20036', 596, 1)
end

function spell1_20036(pUnit, Event) --@Flash of Light,Heal--
pUnit:FullCastSpellOnTarget(37254,pUnit)
pUnit:RegisterEvent('Sorts_20036', 1500, 1)
end

function spell2_20036(pUnit, Event) --@Hammer of Justice,n/a--
pUnit:FullCastSpellOnTarget(39077,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20036', 6261, 1)
end

function spell3_20036(pUnit, Event) --@Hammer of Wrath,n/a--
pUnit:FullCastSpellOnTarget(37255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20036', 500, 1)
end

function Sorts_20036(pUnit, Event)
local choix_sorts_20036 = math.random(0, 3)
if choix_sorts_20036 == 0 then
pUnit:RegisterEvent('spell0_20036', 1, 1)
end
if choix_sorts_20036 == 1 then
pUnit:RegisterEvent('spell1_20036', 1, 1)
end
if choix_sorts_20036 == 2 then
pUnit:RegisterEvent('spell2_20036', 1, 1)
end
if choix_sorts_20036 == 3 then
pUnit:RegisterEvent('spell3_20036', 1, 1)
end
end

function mob20036_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20036', math.random(1500, 3000), 1)
end

function mob20036_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20036_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20036_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20036, 1, 'mob20036_Action')
RegisterUnitEvent(20036, 2, 'mob20036_Leave')
RegisterUnitEvent(20036, 3, 'mob20036_Kill')
RegisterUnitEvent(20036, 4, 'mob20036_Die')
